//
// Created by HQF on 2024/8/9.
//

#ifndef SWMEDIAPLAYERDEMO_DECODERFACTORY_H
#define SWMEDIAPLAYERDEMO_DECODERFACTORY_H

#include <stdint.h>

typedef enum DecodeType {
    DECODE_UNKNOWN = 0,
    DECODE_HW      = 1,
    DECODE_SW      = 2,
} DecodeTypeEnum;

typedef enum PixelFormat {
    PIXEL_FORMAT_NV12   = 1, //yvu
    PIXEL_FORMAT_YUV422 = 2, //yuv
    PIXEL_FORMAT_YUYV   = 3, //yuyv
    PIXEL_FORMAT_DEPTH  = 4, //uint16
    PIXEL_FORMAT_I420   = 5, //yvu
    PIXEL_FORMAT_ERROR  = 0,
} PixelFormatEnum;

class IDecoder {
protected:
    int width, height;
public:
    virtual ~IDecoder() = default;
    virtual int init(uint16_t width, uint16_t height) = 0;
    virtual uint8_t* convert2YUV(void* raw_buffer, size_t raw_size) = 0;
    virtual void release_buffer() = 0;
};

class Decoder {

};


#endif //SWMEDIAPLAYERDEMO_DECODERFACTORY_H
